package api

import (
	"path/filepath"

	"github.com/kataras/iris/v12"
)

type ImageController struct {
	Ctx iris.Context
}

func (c *ImageController) Get() {
	// 设置静态文件处理
	p := c.Ctx.Params()
	file := p.Get("params")
	fullPath := filepath.Join("./data/test/images/", file)
	c.Ctx.SendFile(fullPath, filepath.Base(file))
}
